import request from '@/utils/request'

// 查询行程预算列表
export function listBudget(query) {
  return request({
    url: '/manage/budget/list',
    method: 'get',
    params: query
  })
}

// 查询行程预算详细
export function getBudget(id) {
  return request({
    url: '/manage/budget/' + id,
    method: 'get'
  })
}

// 新增行程预算
export function addBudget(data) {
  return request({
    url: '/manage/budget',
    method: 'post',
    data: data
  })
}

// 修改行程预算
export function updateBudget(data) {
  return request({
    url: '/manage/budget',
    method: 'put',
    data: data
  })
}

// 删除行程预算
export function delBudget(id) {
  return request({
    url: '/manage/budget/' + id,
    method: 'delete'
  })
}

// 删除行程预算根据行程id
export function delBudgetByItineraryId(id) {
  return request({
    url: '/manage/budget/delete/' + id,
    method: 'delete'
  })
}

// 批量添加
export function batchAddBudget(data) {
  return request({
    url: '/manage/budget/batchBudget',
    method: 'post',
    data: data
  })
}